package biopepa;

import java.util.ArrayList;

public class SpeciesAndAction {
	public String species;
	public ArrayList<LocationAndInitial> locations;
	public String actionName;
	public String stoich;
	public int operator;
	public SpeciesAndLocations speciesAndLocations;
	public boolean isDisplacement;
	public NewLocation location1;
	public NewLocation location2;
	
	public SpeciesAndAction(String newActionName, String newStoich, String op, SpeciesAndLocations newSpeciesAndLocations, boolean bool){
		actionName = newActionName;
		stoich = newStoich;
		speciesAndLocations = newSpeciesAndLocations;
		isDisplacement = bool;
		species= speciesAndLocations.species;
		locations = speciesAndLocations.locations;
		
		if(op == "<<"){
			operator = 1;
		}
		else if(op == "(+)"){
			operator = 3;
		}
		else if(op == "(-)"){
			operator = 4;
		}
		else if(op == "(.)"){
			operator = 5;
		}
		else if(op == "->"){
			operator = 6;
		}
		else if(op == "<->"){
			operator = 7;
		}
		else{
			operator = 2;
		}
	}
	
	public SpeciesAndAction(String newActionName, String newStoich, String op, NewLocation newLocation1, NewLocation newLocation2, String newSpecies, boolean bool){
		
		actionName = newActionName;
		stoich = newStoich;
		species = newSpecies;		
		isDisplacement = bool;
		location1 = newLocation1;
		location2 = newLocation2;
		
		if(op == "->"){
			operator = 6;
		}
		else{
			operator = 7;
		}
		
	}
	

}
